<template>
  <div>
    <ChatTitle :title="name"> </ChatTitle>
    <div v-for="(item) in contenttem" :key='item'>
      {{ item }}
    </div>
    <ChatBottom v-model="content"></ChatBottom>
  </div>
</template>

<script>
import chatTitle from "../components/chatTitle";
import chatBottom from "../components/chatBottom";
export default {
  components: {
    ChatTitle: chatTitle,
    ChatBottom: chatBottom,
  },
  data() {
    return {
      name: "",
      content: "",
      contenttem: [],
    };
  },
  watch: {
    content(newVal) {
      this.contenttem.push(newVal);
    },
  },
  methods: {
    getInitData() {},
  },
  async mounted() {
    let name = this.$route.query.name;
    await this.getInitData(name);
    this.name = name;
  },
};
</script>